﻿using System.ComponentModel;
using System.Configuration.Install;
using System.Diagnostics;


namespace NeoBackground
{
    [RunInstaller(true)]
    public partial class Installer1 : Installer
    {
        public Installer1()
        {
            InitializeComponent();
            try
            {
                // Create an instance of an EventLogInstaller.
                var myEventLogInstaller = new EventLogInstaller {Source = Properties.Resources.ProgramName, Log = "NEOBackground"};

                if(!EventLog.SourceExists(Properties.Resources.ProgramName, "."))
                    Installers.Add(myEventLogInstaller);

            }
            catch
            {
                
            }
   


        }
    }
}
